@@ -26,7 +26,7 @@ my %module_build_args = (
'Jerome Quelin'
],
'dist_name' => 'Dist-Zilla-Plugin-Git',
- 'dist_version' => '1.102380',
+ 'dist_version' => '1.102430',
'license' => 'perl',
'module_name' => 'Dist::Zilla::Plugin::Git',
'recommends' => {},
@@ -1,5 +1,8 @@
Revision history for Dist::Zilla::Plugin::Git
+1.102430 2010-08-31 17:12:24 Europe/Paris
+ - fix rt#60740 - allow retrieval of applied tag in git (matt follett)
+
1.102380 2010-08-26 09:39:33 Europe/Paris
- fix hang on windows (alexandr ciornii)
@@ -66,39 +66,39 @@
"provides" : {
"Dist::Zilla::Plugin::Git" : {
"file" : "lib/Dist/Zilla/Plugin/Git.pm",
- "version" : "1.102380"
+ "version" : "1.102430"
},
"Dist::Zilla::Plugin::Git::Check" : {
"file" : "lib/Dist/Zilla/Plugin/Git/Check.pm",
- "version" : "1.102380"
+ "version" : "1.102430"
},
"Dist::Zilla::Plugin::Git::Commit" : {
"file" : "lib/Dist/Zilla/Plugin/Git/Commit.pm",
- "version" : "1.102380"
+ "version" : "1.102430"
},
"Dist::Zilla::Plugin::Git::CommitBuild" : {
"file" : "lib/Dist/Zilla/Plugin/Git/CommitBuild.pm",
- "version" : "1.102380"
+ "version" : "1.102430"
},
"Dist::Zilla::Plugin::Git::Init" : {
"file" : "lib/Dist/Zilla/Plugin/Git/Init.pm",
- "version" : "1.102380"
+ "version" : "1.102430"
},
"Dist::Zilla::Plugin::Git::Push" : {
"file" : "lib/Dist/Zilla/Plugin/Git/Push.pm",
- "version" : "1.102380"
+ "version" : "1.102430"
},
"Dist::Zilla::Plugin::Git::Tag" : {
"file" : "lib/Dist/Zilla/Plugin/Git/Tag.pm",
- "version" : "1.102380"
+ "version" : "1.102430"
},
"Dist::Zilla::PluginBundle::Git" : {
"file" : "lib/Dist/Zilla/PluginBundle/Git.pm",
- "version" : "1.102380"
+ "version" : "1.102430"
},
"Dist::Zilla::Role::Git::DirtyFiles" : {
"file" : "lib/Dist/Zilla/Role/Git/DirtyFiles.pm",
- "version" : "1.102380"
+ "version" : "1.102430"
}
},
"release_status" : "stable",
@@ -113,7 +113,7 @@
},
"x_mailing_list" : "http://www.listbox.com/subscribe/?list_id=139292"
},
- "version" : "1.102380",
+ "version" : "1.102430",
"x_Dist_Zilla" : {
"plugins" : [
{
@@ -25,31 +25,31 @@ name: Dist-Zilla-Plugin-Git
provides:
Dist::Zilla::Plugin::Git:
file: lib/Dist/Zilla/Plugin/Git.pm
- version: 1.102380
+ version: 1.102430
Dist::Zilla::Plugin::Git::Check:
file: lib/Dist/Zilla/Plugin/Git/Check.pm
- version: 1.102380
+ version: 1.102430
Dist::Zilla::Plugin::Git::Commit:
file: lib/Dist/Zilla/Plugin/Git/Commit.pm
- version: 1.102380
+ version: 1.102430
Dist::Zilla::Plugin::Git::CommitBuild:
file: lib/Dist/Zilla/Plugin/Git/CommitBuild.pm
- version: 1.102380
+ version: 1.102430
Dist::Zilla::Plugin::Git::Init:
file: lib/Dist/Zilla/Plugin/Git/Init.pm
- version: 1.102380
+ version: 1.102430
Dist::Zilla::Plugin::Git::Push:
file: lib/Dist/Zilla/Plugin/Git/Push.pm
- version: 1.102380
+ version: 1.102430
Dist::Zilla::Plugin::Git::Tag:
file: lib/Dist/Zilla/Plugin/Git/Tag.pm
- version: 1.102380
+ version: 1.102430
Dist::Zilla::PluginBundle::Git:
file: lib/Dist/Zilla/PluginBundle/Git.pm
- version: 1.102380
+ version: 1.102430
Dist::Zilla::Role::Git::DirtyFiles:
file: lib/Dist/Zilla/Role/Git/DirtyFiles.pm
- version: 1.102380
+ version: 1.102430
requires:
Class::MOP: 0
Cwd: 0
@@ -77,7 +77,7 @@ resources:
bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Dist-Zilla-Plugin-Git
homepage: http://search.cpan.org/dist/Dist-Zilla-Plugin-Git/
repository: http://github.com/jquelin/dist-zilla-plugin-git
-version: 1.102380
+version: 1.102430
x_Dist_Zilla:
plugins:
-
@@ -1,7 +1,7 @@
This archive contains the distribution Dist-Zilla-Plugin-Git,
-version 1.102380:
+version 1.102430:
update your git repository after release
@@ -12,7 +12,7 @@ use warnings;
package Dist::Zilla::Plugin::Git::Check;
BEGIN {
- $Dist::Zilla::Plugin::Git::Check::VERSION = '1.102380';
+ $Dist::Zilla::Plugin::Git::Check::VERSION = '1.102430';
}
# ABSTRACT: check your git repository before releasing
@@ -78,7 +78,7 @@ Dist::Zilla::Plugin::Git::Check - check your git repository before releasing
=head1 VERSION
-version 1.102380
+version 1.102430
=head1 SYNOPSIS
@@ -12,7 +12,7 @@ use warnings;
package Dist::Zilla::Plugin::Git::Commit;
BEGIN {
- $Dist::Zilla::Plugin::Git::Commit::VERSION = '1.102380';
+ $Dist::Zilla::Plugin::Git::Commit::VERSION = '1.102430';
}
# ABSTRACT: commit dirty files
@@ -107,7 +107,7 @@ Dist::Zilla::Plugin::Git::Commit - commit dirty files
=head1 VERSION
-version 1.102380
+version 1.102430
=head1 SYNOPSIS
@@ -12,7 +12,7 @@ use warnings;
package Dist::Zilla::Plugin::Git::CommitBuild;
BEGIN {
- $Dist::Zilla::Plugin::Git::CommitBuild::VERSION = '1.102380';
+ $Dist::Zilla::Plugin::Git::CommitBuild::VERSION = '1.102430';
}
# ABSTRACT: checkin build results on separate branch
@@ -139,7 +139,7 @@ Dist::Zilla::Plugin::Git::CommitBuild - checkin build results on separate branch
=head1 VERSION
-version 1.102380
+version 1.102430
=head1 SYNOPSIS
@@ -12,7 +12,7 @@ use warnings;
package Dist::Zilla::Plugin::Git::Init;
BEGIN {
- $Dist::Zilla::Plugin::Git::Init::VERSION = '1.102380';
+ $Dist::Zilla::Plugin::Git::Init::VERSION = '1.102430';
}
# ABSTRACT: initialize git repository on dzil new
@@ -48,7 +48,7 @@ Dist::Zilla::Plugin::Git::Init - initialize git repository on dzil new
=head1 VERSION
-version 1.102380
+version 1.102430
=head1 DESCRIPTION
@@ -12,7 +12,7 @@ use warnings;
package Dist::Zilla::Plugin::Git::Push;
BEGIN {
- $Dist::Zilla::Plugin::Git::Push::VERSION = '1.102380';
+ $Dist::Zilla::Plugin::Git::Push::VERSION = '1.102430';
}
# ABSTRACT: push current branch
@@ -59,7 +59,7 @@ Dist::Zilla::Plugin::Git::Push - push current branch
=head1 VERSION
-version 1.102380
+version 1.102430
=head1 SYNOPSIS
@@ -12,7 +12,7 @@ use warnings;
package Dist::Zilla::Plugin::Git::Tag;
BEGIN {
- $Dist::Zilla::Plugin::Git::Tag::VERSION = '1.102380';
+ $Dist::Zilla::Plugin::Git::Tag::VERSION = '1.102430';
}
# ABSTRACT: tag the new version
@@ -41,6 +41,16 @@ has tag_format => ( ro, isa=>Str, default => 'v%v' );
has tag_message => ( ro, isa=>Str, default => 'v%v' );
has branch => ( ro, isa=>Str, predicate=>'has_branch' );
+
+has tag => ( ro, isa => Str, lazy_build => 1, );
+
+sub _build_tag
+{
+ my $self = shift;
+ return _format_tag($self->tag_format, $self->zilla);
+}
+
+
# -- role implementation
sub before_release {
@@ -48,7 +58,7 @@ sub before_release {
my $git = Git::Wrapper->new('.');
# Make sure a tag with the new version doesn't exist yet:
- my $tag = _format_tag($self->tag_format, $self->zilla);
+ my $tag = $self->tag;
$self->log_fatal("tag $tag already exists")
if $git->tag('-l', $tag );
}
@@ -64,7 +74,7 @@ sub after_release {
my @branch = $self->has_branch ? ( $self->branch ) : ();
# create a tag with the new version
- my $tag = _format_tag($self->tag_format, $self->zilla);
+ my $tag = $self->tag;
$git->tag( @opts, $tag, @branch );
$self->log("Tagged $tag");
}
@@ -80,7 +90,7 @@ Dist::Zilla::Plugin::Git::Tag - tag the new version
=head1 VERSION
-version 1.102380
+version 1.102430
=head1 SYNOPSIS
@@ -145,6 +155,15 @@ The distribution version
=back
+=head1 METHODS
+
+=head2 tag
+
+ my $tag = $plugin->tag;
+
+Return the tag that will be / has been applied by the plugin. That is,
+returns C<tag_format> as completed with the real values.
+
=for Pod::Coverage after_release
before_release
@@ -12,7 +12,7 @@ use warnings;
package Dist::Zilla::Plugin::Git;
BEGIN {
- $Dist::Zilla::Plugin::Git::VERSION = '1.102380';
+ $Dist::Zilla::Plugin::Git::VERSION = '1.102430';
}
# ABSTRACT: update your git repository after release
@@ -28,7 +28,7 @@ Dist::Zilla::Plugin::Git - update your git repository after release
=head1 VERSION
-version 1.102380
+version 1.102430
=head1 DESCRIPTION
@@ -12,7 +12,7 @@ use warnings;
package Dist::Zilla::PluginBundle::Git;
BEGIN {
- $Dist::Zilla::PluginBundle::Git::VERSION = '1.102380';
+ $Dist::Zilla::PluginBundle::Git::VERSION = '1.102430';
}
# ABSTRACT: all git plugins in one go
@@ -66,7 +66,7 @@ Dist::Zilla::PluginBundle::Git - all git plugins in one go
=head1 VERSION
-version 1.102380
+version 1.102430
=head1 SYNOPSIS
@@ -12,7 +12,7 @@ use warnings;
package Dist::Zilla::Role::Git::DirtyFiles;
BEGIN {
- $Dist::Zilla::Role::Git::DirtyFiles::VERSION = '1.102380';
+ $Dist::Zilla::Role::Git::DirtyFiles::VERSION = '1.102430';
}
# ABSTRACT: provide the allow_dirty & changelog attributes
@@ -70,7 +70,7 @@ Dist::Zilla::Role::Git::DirtyFiles - provide the allow_dirty & changelog attribu
=head1 VERSION
-version 1.102380
+version 1.102430
=head1 DESCRIPTION
@@ -15,7 +15,7 @@ use Dist::Zilla 1.093250;
use Dist::Zilla::Tester;
use Git::Wrapper;
use Path::Class;
-use Test::More tests => 3;
+use Test::More tests => 4;
# build fake repository
my $zilla = Dist::Zilla::Tester->from_config({
@@ -38,6 +38,7 @@ $zilla->release;
my @tags = $git->tag;
is( scalar(@tags), 1, 'one tag created' );
is( $tags[0], 'v1.23', 'new tag created after new version' );
+is( $tags[0], $zilla->plugin_named('Git::Tag')->tag(), 'new tag matches the tag the plugin claims is the tag.');
# attempting to release again should fail
eval { $zilla->release };